@extends('admin.main')
@section('style')
    <style>
        body {
            padding: 0;
        }
    </style>
@endsection
@section('body')
    <div class="data-table table-striped">
        <table class="">
            <thead>
            <tr>
                <th class="">商品名称</th>
                <th class="">入库前的库存</th>
                <th class="">入库数量</th>
                <th class="">入库时间</th>
            </tr>
            </thead>
            <tbody>
            @if(count($rows['data']))
                @foreach($rows['data'] as $v)
                    <tr>
                        <td>{{$v['goods_name']}}</td>
                        <td>{{$v['before_store']}}</td>
                        <td>{{$v['num']}}</td>
                        <td>{{$v['created_at']}}</td>
                    </tr>
                @endforeach
            @else
                <td colspan="5" class="text-center"> aOh! 暂时还没有内容!</td>
            @endif
            </tbody>
        </table>
    </div>
    <div class="page">
        @if($rows['last_page']>1)
            <div>
                <a class="first" href="{{urlPlat('single','getStockList',['page'=>1,'keyword'=>request('keyword')])}}">首页</a>
                @if($rows['prev_page_url'])
                    <a class="prev" href="{{$rows['prev_page_url']}}">&lt;&lt;</a>
                @endif
                @if(count($rows['pageNoList']))
                    @foreach($rows['pageNoList'] as $v)
                        @if($rows['current_page'] == $v)
                            <span class="current">{{$v}}</span>
                        @else
                            <a class="num" href="{{urlPlat('single','getStockList',['page'=>$v,'keyword'=>request('keyword')])}}">{{$v}}</a>
                        @endif
                    @endforeach
                @endif
                @if($rows['next_page_url'])
                    <a class="next" href="{{$rows['next_page_url']}}">&gt;&gt;</a>
                @endif
                <a class="last" href="{{urlPlat('single','getStockList',['page'=>$rows['last_page'],'keyword'=>request('keyword')])}}">末页</a>
                <span class="rows">共 {{$rows['total']}} 条记录</span>
            </div>
        @endif
    </div>
@endsection
